package day07;

import java.util.Scanner;

public class PrimeNumbre2 {
    public static void main(String[] args) {
        add();
    }
        public static void add(){
        Scanner scanner = new Scanner(System.in);
        int max = scanner.nextInt();
        for (int num = 2;num<=max;num++){
            boolean flag = true;//假设是素数
            for (int i = 2;i<=num/2;i++){
                if (num%i==0){
                    flag = false;//修改为false
                    break;
                }
            }
            if (flag){
                System.out.println(num);
            }
        }
    }
}
